﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;

namespace App2Wpf.ViewModels
{
    public class smallCardVM :ObservableObject
    {
        public smallCardVM()
        {
            
            _close = new RelayCommand(new Action(_Open));

            _close = new RelayCommand(new Action(_Close));
        }

        #region 打开

        private ICommand _open;
        public ICommand Open
        {
            get { return _open; }
            set
            {
                _open = value;
                OnPropertyChanged("Open");
            }
        }
        private void _Open()
        {
            System.Environment.Exit(0);

        }
        #endregion

        #region 关闭

        private ICommand _close;
        public ICommand Close
        {
            get { return _close; }
            set
            {
                _close = value;
                OnPropertyChanged("Close");
            }
        }
        private void _Close()
        {
            System.Environment.Exit(0);
            
        }
        #endregion

        #region 打开窗口
        private ICommand _openUserWindow;
        public ICommand OpenUserWindow
        {
            get { return _openUserWindow; }
            set
            {
                _openUserWindow = value;
                OnPropertyChanged("OpenUserWindow");
            }
        }
        private void _OpenUserWindow(object obj)
        {
            
        }
        #endregion

        #region 最小化
        private ICommand _min;
        public ICommand Min
        {
            get { return _min; }
            set
            {
                _min = value;
                OnPropertyChanged("Min");
            }
        }
        private void _Min(object obj)
        {
            //StaticModels.mainWindow.WindowState = System.Windows.WindowState.Minimized;
        }
        #endregion


    }
}
